<div ng-if="pagedata.op=='get'" class="fui-page fui-page-current">
    <div class='fui-content' >
		<div class="fui-cell-group" style="margin-top:0">
			<div class="fui-tab fui-tab-success">
					<a ng-class="{'active':pagedata.post.fee_type!=1}" ng-click="pagedata.post.fee_type=0;pagedata.post.fee=0;pagedata.refresh()">余额提现</a>
					<a ng-class="{'active':pagedata.post.fee_type==1}" ng-click="pagedata.post.fee_type=1;pagedata.post.fee=0;pagedata.refresh()">红包提现</a>
			</div>
		</div>
        <div class='fui-cell-group fui-cell-group-o'>
            <div class='fui-cell-title'>
                <div class='fui-cell-info' style='color:#999'>当前可提现金额: ￥
					<span id='current'>{{pagedata.post.fee_type!=1?pagedata.item.credit2:pagedata.item.ideal_money}}</span>
					<a ng-if="pagedata.post.fee_type!=1" id='btn-all' class='text-primary external' href='#' ng-click="pagedata.post.fee=pagedata.item.credit2;pagedata.refresh()">全部提现</a>
					<a ng-if="pagedata.post.fee_type==1" id='btn-all' class='text-primary external' href='#' ng-click="pagedata.post.fee=pagedata.item.ideal_money;pagedata.refresh()">全部提现</a>
				</div>
            </div>
			<div class='fui-cell-title'>提现金额
                <small ng-if="pagedata.setting.min>0">提现额度最小为: <span class='text-danger'>￥{{pagedata.setting.min}}</span></small>
            </div>
            <div class='fui-cell'>
                <div class='fui-cell-label big' style='width:auto;'>￥</div>
                <div class='fui-cell-info'><input type='text' class='fui-input' placeholder="0.00" style='font-size:1.2rem;' ng-model="pagedata.post.fee" ng-change="pagedata.refresh()"></div>
            </div>
            <div class="fui-cell">
                <div class="fui-cell-label" style="width: 120px;"><span class="re-g">提现方式</span></div>
                <div ng-if="pagedata.post.fee_type!=1" class="fui-cell-info">
                    <select id="applytype" ng-model="pagedata.post.type">
						<option value="3" ng-selected="pagedata.post.type=='3'">提现到保证金(免手续费)</option>
                        <option value="0" ng-selected="pagedata.post.type=='0'">提现到微信钱包</option>
						<option value="1" ng-selected="pagedata.post.type=='1'">提现到支付宝</option>
						<option value="2" ng-selected="pagedata.post.type=='2'">提现到银行卡</option>
                    </select>
                </div>
				<div ng-if="pagedata.post.fee_type==1" class="fui-cell-info">
                    <select id="applytype" ng-model="pagedata.post.to_type">
						<option value="1" ng-selected="pagedata.post.to_type=='1'">提现到余额</option>
						<option value="2" ng-selected="pagedata.post.to_type=='2'">提现到微信钱包</option>
                    </select>
                </div>
                <div class="fui-cell-remark"></div>
            </div>
            <div ng-if="pagedata.post.type==1 || pagedata.post.type==2" class="fui-cell ab-group">
                <div class="fui-cell-label" style="width: 120px;">姓名</div>
                <div class="fui-cell-info"><input type="text" id="realname" name="realname" ng-model="pagedata.post.realname" class='fui-input' value="{{pagedata.post.realname}}" max="25"/></div>
            </div>
            <div ng-if="pagedata.post.type==1" class="fui-cell alipay-group">
                <div class="fui-cell-label" style="width: 120px;">支付宝帐号</div>
                <div class="fui-cell-info">
				<input type="text" id="alipay" name="alipay" class='fui-input' ng-model="pagedata.post.alipay" value="{{pagedata.post.alipay}}" max="25"/>
				</div>
            </div>
            <div ng-if="pagedata.post.type==1" class="fui-cell alipay-group">
                    <div class="fui-cell-label" style="width: 120px;">确认帐号</div>
                    <div class="fui-cell-info"><input type="text" id="alipay1" ng-model="pagedata.post.alipay1" name="alipay1" class='fui-input' value="{{pagedata.post.alipay1}}" max="25"/></div>
            </div>
            <div ng-if="pagedata.post.type==2" class="fui-cell bank-group" >
                    <div class="fui-cell-label" style="width: 120px;">所属银行</div>
                    <div class="fui-cell-info">
                       	<input type="text" name="bankname" class='fui-input' ng-model="pagedata.post.bankname" value="{{pagedata.post.bankname}}"/>
                    </div>
            </div>
            <div ng-if="pagedata.post.type==2" class="fui-cell bank-group">
					<div class="fui-cell-label" style="width: 120px;">银行卡号</div>
					<div class="fui-cell-info"><input type="text" id="bankcard" name="bankcard" class='fui-input' ng-model="pagedata.post.bankcard" value="{{pagedata.post.bankcard}}" max="25"/></div>
            </div>
            <div ng-if="pagedata.post.type==2" class="fui-cell bank-group">
                    <div class="fui-cell-label" style="width: 120px;">确认卡号</div>
                    <div class="fui-cell-info"><input type="text" id="bankcard1" name="bankcard1" class='fui-input' ng-model="pagedata.post.bankcard1" value="{{pagedata.post.bankcard1}}" max="25"/></div>
            </div>
            <div ng-if="pagedata.post.to_type!='1' && pagedata.post.type!='3'" class='fui-cell-title disabled'>提现手续费为 <text class='text-danger'> {{pagedata.setting.percent || 0}}</text>%</div>
            <div ng-if="pagedata.post.to_type!='1' && pagedata.post.type!='3'" class='fui-cell-title charge-group disabled' style="padding-top:0">本次提现将扣除手续费 ￥<text class='text-danger'> {{pagedata.item.service_money || '0.00'}}</text>
            </div>

            <div ng-if="pagedata.post.to_type!='1' && pagedata.post.type!='3'" class='fui-cell-title charge-group disabled' style="padding-top:0">本次提现实际到账金额 ￥<text class='text-danger'> {{pagedata.item.cash_money || '0.00'}}</text>
            </div>
        </div>
        <a ng-if="pagedata.post.fee_type!=1" id='btn-next' class='btn btn-success block ' ng-click="post(pagedata.post,'post')">提现</a>
		<a ng-if="pagedata.post.fee_type==1" id='btn-next' class='btn btn-success block ' ng-click="post(pagedata.post,'redpost')">提现</a>
    </div>
</div>
<div ng-include="sys_html('common/_footer')"></div>
<script>
scope.pagedata.refresh=function(){
	scope.pagedata.item.service_money=(scope.pagedata.post.fee*scope.pagedata.setting.percent/100).toFixed(2);
	scope.pagedata.item.cash_money=(scope.pagedata.post.fee-scope.pagedata.item.service_money).toFixed(2);
}
</script>